﻿using System.IO;
using System.Net;
using System.Xml;

namespace APIDataManage
{
    public class HttpGetBase
    {
        public XmlDocument getAPIData(string url)
        {
            HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(url);
            WebResponse myResponse = myRequest.GetResponse();
            Stream stream = myResponse.GetResponseStream();
            XmlDocument doc = new XmlDocument();
            doc.Load(stream);
            return doc;
        }
    }
}
